#!/usr/bin/env python

from random import random

from perseus import Perseus

TEST = [ 
         "CVO LAB",
         "PERSEUS",
]

for test in TEST :
   p = Perseus(aleas=[ random() for i in range(0,4) ])

   encoded_msg = p.code( test )
   print len(encoded_msg), repr(encoded_msg)

   decoded_msg = p.decode( encoded_msg )
   print len(decoded_msg), repr(decoded_msg)

   print "\t -->", decoded_msg == test
